package com.example.service.impl;

import com.example.mapper.TbCartMapper;
import com.example.pojo.TbCart;
import com.example.service.TbCartService;

import javax.annotation.Resource;
import java.util.List;

/**
 * @program:bookstore2
 * @auther:linan
 * @date:2022/12/26
 **/
public class TbOrderServiceImpl implements TbCartService {
    @Resource
    TbCartMapper tbCartMapper;

    @Override
    public List<TbCart> list() {
        return tbCartMapper.list();
    }

    @Override
    public TbCart selectById(Long bookId) {
        return tbCartMapper.selectById(bookId);
    }

    @Override
    public List<TbCart> selectByBookId(Long cid) {
        return tbCartMapper.selectByBookId(cid);
    }

    @Override
    public List<TbCart> selectByName(String bookName) {
        return tbCartMapper.selectByName(bookName);
    }

    @Override
    public List<TbCart> selectByMulCon(TbCart tbCart) {
        return tbCartMapper.selectByMulCon(tbCart);
    }

    @Override
    public int add(TbCart tbCart) {
        return tbCartMapper.add(tbCart);
    }

    @Override
    public int update(TbCart tbCart) {
        return tbCartMapper.update(tbCart);
    }
}
